-- GENERATED SPELL FOR [Ymirjar Berserker] --


function spell0_26696(pUnit, Event) --@Shred,Self--
pUnit:FullCastSpellOnTarget(49121,pUnit)
pUnit:RegisterEvent('Sorts_26696', 5280, 1)
end

function spell1_26696(pUnit, Event) --@Shred,Self--
pUnit:FullCastSpellOnTarget(61548,pUnit)
pUnit:RegisterEvent('Sorts_26696', 5328, 1)
end

function spell2_26696(pUnit, Event) --@Terrify,n/a--
pUnit:FullCastSpellOnTarget(49106,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26696', 5000, 1)
end

function Sorts_26696(pUnit, Event)
local choix_sorts_26696 = math.random(0, 2)
if choix_sorts_26696 == 0 then
pUnit:RegisterEvent('spell0_26696', 1, 1)
end
if choix_sorts_26696 == 1 then
pUnit:RegisterEvent('spell1_26696', 1, 1)
end
if choix_sorts_26696 == 2 then
pUnit:RegisterEvent('spell2_26696', 1, 1)
end
end

function mob26696_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26696', math.random(1500, 3000), 1)
end

function mob26696_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26696_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26696_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26696, 1, 'mob26696_Action')
RegisterUnitEvent(26696, 2, 'mob26696_Leave')
RegisterUnitEvent(26696, 3, 'mob26696_Kill')
RegisterUnitEvent(26696, 4, 'mob26696_Die')
